import React from "react"

class Test extends React.Component {
  constructor(props){
    super(props)
    this.state = {
      count: 0
    }
  }
  componentDidMount(): void {
    this.setState({ count: this.state.count + 1})
    console.log(this.state.count)
    this.setState({ count: this.state.count + 1})
    console.log(this.state.count)
    setTimeout(()=> {
      this.setState({ count: this.state.count + 1})
      console.log(this.state.count)
    },10)
    //setTimeout(()=> {
    //  this.setState({ count: this.state.count + 1})
    //  console.log(this.state.count)
    //},0)
  }
  render(): React.ReactNode {
    return <div>{this.state.count}</div>
  }
}

export default Test